{% extends 'template/base.html' %}

{% block head %}
    {{ super() }}
    <title>用户管理</title>
    <style>
        td {
            vertical-align: middle !important;
        }
    </style>
{% endblock %}

{% block body %}

    {% include 'template/admin-header.html' %}


    <div class="container" style="margin-top: 40px">


        {#        <div class="text-left" style="margin-bottom: 10px">#}
        {#            <form class="form-inline" method="get">#}
        {#                <input type="text" class="form-control" placeholder="输入商品名" name="k"#}
        {#                       value="{{ request.args.k | d('', true) }}">#}
        {#                <button type="submit" class="btn btn-primary">搜索商品</button>#}
        {#                <a href="{{ url_for('admin.new_product_ep') }}" class="btn btn-success">添加商品</a>#}
        {#            </form>#}
        {#        </div>#}
        {##}
        {#        {% if request.args.k %}#}
        {#            <div style="text-align: left;color: #666;font-size: 18px">关于 “ {{ request.args.k }} ” 的商品：</div>#}
        {#        {% else %}#}
        {#            <div style="text-align: left;color: #666;font-size: 18px">全部商品：</div>#}
        {#        {% endif %}#}

        <table class="table table-bordered table-striped" style="margin-top: 10px">

            <tr>

                <td>#</td>
                <td>邮箱地址</td>
                <td>真实姓名</td>
                <td>联系电话</td>
                <td>地址</td>
                <td>注册时间</td>

            </tr>

            {% for user in users %}

                <tr>
                    <!--列表-->
{#                    <td>{{ loop.index + (pagination.page - 1) * pagination.per_page }}</td>#}
                    <td>{{ loop.index }}</td>
                    <td>
                        <span class="pd-name">{{ user.email }}</span>
                    </td>
                    <style>
                        .pd-name:hover + img {
                            display: block;
                        }

                        .pd-name {
                            cursor: pointer;
                        }

                        .pd-name + img {
                            position: absolute;
                            display: none;
                            width: 300px;
                        }
                    </style>
                    <td>{{ user.realname }}</td>
                    <td>{{ user.tel }}</td>

                    <td>{{ user.address }}</td>
                    <td>{{ user.create_time }}</td>

                </tr>

            {% endfor %}

        </table>
        {#        {% include 'template/pagination.html' %}#}
    </div>
{% endblock %}
